<?php

namespace App\Http\Controllers\Admin;

use App\Model\Orders;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class OrdersController extends Controller
{
    /**
     * @return mixed
     * 订单列表
     */
    public function index(){
        $orders = new Orders();
        $ordersInfo = $orders->orderBy('created_at','desc')->get();
        return view('admin.orders.index',['ordersInfo'=>$ordersInfo]);
    }

    /**
     * 查看详情
     */
    public function detail($id){
        $orders = new Orders();
        $ordersInfo = $orders->find($id);
        return view('admin.orders.detail',['ordersInfo'=>$ordersInfo]);
    }
}
